package com.smartlbs.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.smartlbs.baseframe.web.ResponseInfo;
import com.smartlbs.service.IBetInfoService;
import com.smartlbs.vo.BetInfoVo;
/**押注信息控制层类
 * @author idaowei
 *
 */
@Controller
@RequestMapping("bet/info")
public class BetInfoController {
	@Autowired
	private IBetInfoService betInfoService;
	/**获取押注项
	 * @param request
	 * @param gameId,赛事列表id
	 * @return
	 */
	@RequestMapping("getbetBygameId")
	@ResponseBody
	public ResponseInfo getbetBygameId(HttpServletRequest request,Long gameId){
		int result = 0;
		String message = "";
		Object data = null;
		try {
			 List<BetInfoVo> findbyGameId = betInfoService.findbyGameId(gameId);
			 
			result = 1;
			message = "查询信息成功";
			data=findbyGameId;
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			message = "发生异常";
			e.printStackTrace();
		} finally {
		}
		ResponseInfo responseInfo = new ResponseInfo();
		responseInfo.setData(data);
		responseInfo.setResult(result);
		responseInfo.setMessage(message);
		return responseInfo;
	}

}
